<template>
    <div >
        <h1>购物车啦</h1>
        <div v-for="i in goodsList" class="shopping">
            <img :src="i.picUrl" alt="" width="64px">
            <p>{{i.name}}  --</p>
            <p>  price:{{i.retailPrice}}</p>
        </div>
    </div>
</template>
<script>
import axios from "axios"
export default{
    data(){
        return{
            goodsList:[]
        }
    },
    created(){
        axios
            .get("http://120.79.170.239:8082/wx/home/index")
            .then((res) => {
                this.goodsList = res.data.data.newGoodsList
                console.log(res)
            })
            .catch(function(error){
                console.log(2+error)
            })
    }
}
</script>


<style scoped>
    .shopping{
        display: flex;
        flex-wrap: wrap;
    }
</style>